<?php
class Ordermanager_Model_Updateorder implements Ordermanager_Model_Mainable{
    
    private $core_controller_tokencheckout;
    private $core_controller_notnull;
    private $excepted_result = 1;
    private $actual_result;
    private $ordermanager_data_updateorder;
    
    public function main(array $variables = null) {
        $this->core_controller_tokencheckout = new Core_Controller_Tokencheckout;
        $this->core_controller_tokencheckout->main($variables['post']);
        $this->core_controller_notnull = new Core_Controller_Notnull;
        $this->core_controller_notnull->main($variables);
        $this->ordermanager_data_updateorder = new Ordermanager_Data_Updateorder;
        $this->actual_result = $this->ordermanager_data_updateorder->main($variables);
        if(
                $this->actual_result == $this->excepted_result
                ){
            header("Location: ".SITE_ROOT."zarzadzaj-zamowieniami.html");
        }
        else {
            header("Location: ".SITE_ROOT."zarzadzaj-zamowieniami.html");
        }
    }

}
